package com.ijava.base.domain;

import java.util.Date;

public class BaseDomain implements java.io.Serializable {

	private static final long serialVersionUID = -3434023538051946334L;
	private String action;
	private String saveAndNew;
	private String[] keys;
	private String message;

	// paging
	private int pageNo = 1;
	private int pageSize = 12;
	private int total;
	private int pageNumber = 1;

	private Date crTime;
	private String crUserId;
	private Date upTime;
	private String upUserId;
	private int rowEnable = 1;
	private int rowOrder;

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String[] getKeys() {
		return keys;
	}

	public void setKeys(String[] keys) {
		this.keys = keys;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPageNumber() {
		double pagingFloat = Double.valueOf(getTotal())
				/ Double.valueOf(getPageSize());
		int pagingInt = Integer.valueOf(getTotal() / getPageSize());
		if (pagingFloat > pagingInt || pagingFloat == 0f || pagingInt == 0) {
			pagingInt++;
		}
		return pagingInt;
	}

	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}

	public Date getCrTime() {
		return crTime;
	}

	public void setCrTime(Date crTime) {
		this.crTime = crTime;
	}

	public String getCrUserId() {
		return crUserId;
	}

	public void setCrUserId(String crUserId) {
		this.crUserId = crUserId;
	}

	public Date getUpTime() {
		return upTime;
	}

	public void setUpTime(Date upTime) {
		this.upTime = upTime;
	}

	public String getUpUserId() {
		return upUserId;
	}

	public void setUpUserId(String upUserId) {
		this.upUserId = upUserId;
	}

	public int getRowOrder() {
		return rowOrder;
	}

	public void setRowOrder(int rowOrder) {
		this.rowOrder = rowOrder;
	}

	public int getRowEnable() {
		return rowEnable;
	}

	public void setRowEnable(int rowEnable) {
		this.rowEnable = rowEnable;
	}

	public String getSaveAndNew() {
		return saveAndNew;
	}

	public void setSaveAndNew(String saveAndNew) {
		this.saveAndNew = saveAndNew;
	}



}
